import request from "@/utils/request";

export default {
  // 获取列表
  getList(query, current = 1, size = 20) {
    return request({
      url: "/article/article/search",
      method: "POST",
      data: {
        ...query,
        current,
        size
      }
    });
  },
  // 删除
  /* delItem(id) {
    return request({
      url: `/article/article/${id}`,
      method: "DELETE"
    });
  }, */
  // 查询单个
  findItem(id) {
    return request({
      url: `/article/article/${id}`,
      method: "GET"
    });
  },
  // 获取分类标签列表
  getLabelList() {
    return request({
      url: "article/category/label/list",
      method: "GET"
    });
  },
  // 审核通过
  auditSuccessItem(id) {
    return request({
      url: `article/article/audit/success/${id}`,
      method: "GET",
    });
  },
  // 审核未通过
  auditFailItem(id) {
    return request({
      url: `article/article/audit/fail/${id}`,
      method: "GET",
    });
  }
};
